#pragma once

#include <filetransfferwork.h>

class FileTransfferSystem {
public:
	static FileTransfferSystem& getInstance() {
		static FileTransfferSystem instance;
		return instance;
	}

	void init();

	int getThreadCnt() {
		return threadCnt_;
	}

	void postTask(std::shared_ptr<LogicNode> logicNode);

	void stop();
private:
	FileTransfferSystem() = default;

private:
	std::mutex workLock_;
	std::vector<std::shared_ptr<FileTransfferWork>> fileTransfferWorks_;
	int threadCnt_;
};